import { BrowserRouter, Routes, Route } from "react-router-dom";
import { Login } from "../Pages/Login";
import { NoMatch } from "../Pages/NoMatch";
import { Home } from "../Pages/Home";

import { TaskCenter } from "../Pages/Home/TaskCenter";
import { DailyWork } from "../Pages/Home/TaskCenter/DailyWork";
import { WeeklyWork } from "../Pages/Home/TaskCenter/WeeklyWork";
import { CalenderWork } from "../Pages/Home/TaskCenter/CalenderWork";
import { Test } from "../Pages/Home/TaskCenter/Test";
// const CLayout = React.lazy(() => import("../Layout"));

import { MessageCenter } from "../Pages/Home/MessageCenter";
import  ManageCenter  from "../Pages/Home/ManageCenter";

const Router = () => {
  return (
    <BrowserRouter>
      <Routes>
        <Route path="/" element={<Login />} />
        <Route path="login" element={<Login />} />
        <Route path="home" element={<Home />}>
          <Route path="task-center" element={<TaskCenter />}>
            <Route index element={<DailyWork />} />
            <Route path="daily-work" element={<DailyWork />} />
            <Route path="weekly-work" element={<WeeklyWork />} />
            <Route path="calender-work" element={<CalenderWork />} />
            <Route path="test" element={<Test />} />
          </Route>
          <Route path="message-center" element={<MessageCenter />} />
          <Route path="manage-center" element={<ManageCenter />} />
        </Route>
        <Route path="*" element={<NoMatch />} />
      </Routes>
    </BrowserRouter>
  );
};

export { Router };
